Page({

  /**
   * 页面的初始数据
   */
  data: {
    tit:"tit1",
    bannerImgs:[
      "../../images/jpg/banner.jpg",
      "../../images/jpg/banner.jpg",
      "../../images/jpg/banner.jpg"
    ],
    notice:[
      "公告1",
      "公告2"
    ],
    kind: [
     [
        { id: 222, pic: "../../images/jpg/banner_kind.jpg", title: "牛类产品" },
        { id: 223, pic: "../../images/jpg/banner_kind.jpg", title: "羊类产品" },
        { id: 224, pic: "../../images/jpg/banner_kind.jpg", title: "猪类产品" },
        { id: 225, pic: "../../images/jpg/banner_kind.jpg", title: "鸡类产品" },
        { id: 226, pic: "../../images/jpg/banner_kind.jpg", title: "鸭类产品" },
        { id: 227, pic: "../../images/jpg/banner_kind.jpg", title: "海鲜冻品" },
        { id: 228, pic: "../../images/jpg/banner_kind.jpg", title: "酒店食材" },
        { id: 229, pic: "../../images/jpg/banner_kind.jpg", title: "火锅食材" },
        { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "肥牛肥羊" },
        { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "机械设备" }
     ],
    [
      { id: 232, pic: "../../images/jpg/banner_kind.jpg", title: "产品求购" },
      { id: 233, pic: "../../images/jpg/banner_kind.jpg", title: "粮油干货" },
      { id: 243, pic: "../../images/jpg/banner_kind.jpg", title: "展会信息" },
      { id: 235, pic: "../../images/jpg/banner_kind.jpg", title: "地方特产" },
      { id: 226, pic: "../../images/jpg/banner_kind.jpg", title: "鸭类产品" },
      { id: 227, pic: "../../images/jpg/banner_kind.jpg", title: "海鲜冻品" },
      { id: 228, pic: "../../images/jpg/banner_kind.jpg", title: "酒店食材" },
      { id: 229, pic: "../../images/jpg/banner_kind.jpg", title: "火锅食材" },
      { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "肥牛肥羊" },
      { id: 220, pic: "../../images/jpg/banner_kind.jpg", title: "机械设备" }
    ]
    ],
    ruzhuList:[
      "商家1",
      "商家2",
      "商家3"
    ],
    merchantList:[
      {
        id:4345,
        headPic:"../../images/jpg/new_pubic.jpg",
        title:"猪副冻品批发",
        address:"河南省郑州市惠济区信基调某某某某",
        star:5,
        hot:12932,
        distance:12,
        tel:13888888888
      },
      {
        id: 4345,
        headPic: "../../images/jpg/new_pubic.jpg",
        title: "猪副冻品批发",
        address: "河南省郑州市惠济区信基调某某某某",
        star: 5,
        hot: 12932,
        distance: 12,
        tel: 13888888888
      },
      {
        id: 4345,
        headPic: "../../images/jpg/new_pubic.jpg",
        title: "猪副冻品批发",
        address: "河南省郑州市惠济区信基调某某某某",
        star: 5,
        hot: 12932,
        distance: 12,
        tel: 13888888888
      },
      {
        id: 4345,
        headPic: "../../images/jpg/new_pubic.jpg",
        title: "猪副冻品批发",
        address: "河南省郑州市惠济区信基调某某某某",
        star: 5,
        hot: 12932,
        distance: 12,
        tel: 13888888888
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.setNavigationBarTitle({
        title: '商家',
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  },
  changeNav(e) {
    this.setData({tit:e.target.id});
  },
  search() {
      wx.navigateTo({
          url: '../merchant_detail/merchant_detail',
      })
  }
})